package com.ruoyi.common.utils.token;

import java.util.Map;

/**
 * @description: 初始化线程局部变量
 * @author: sange
 **/
public class UserThreadLocal {
    //把构造函数私有，外面不能new，只能通过下面两个方法操作
    private UserThreadLocal() {

    }
    private static final ThreadLocal<Map<String, Object>> LOCAL = new ThreadLocal<Map<String, Object>>();

    public static void set(Map<String, Object> userRegis) {
        LOCAL.set(userRegis);
    }

    public static Map<String, Object> get() {
        return LOCAL.get();
    }
}
